<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>退换货服务-{{$SEO['title']}}</title>
    <meta name="keywords" content="{{$SEO['keywords']}}"/>
    <meta name="description" content="{{$SEO['description']}}"/>

    <!--公用css引用-->
    <?php //include 'include/style.php';?>
    @include('front.common.style')
    <!--END/公用css引用-->
    <link rel="stylesheet" href="{{ URL::asset('/') }}css/userCenter.css">
</head>
<body>

<!--公共头部-->
@include('front.common.header')
<!--END/公共头部-->

@inject('orderService','App\Interfaces\OrderService')
@inject('pictureService','App\Interfaces\PictureService')

<div class="inbox user-center">
    <div class="layout-margin unend">
        <div class="sidebar-end"></div>
        <div class="sidebar-start">
            @include('front.common.leftnav')
        </div>

        <!--主体部分-->
        <div class="container">
            <div class="container-inner u-order">
                <div class="order-list">
                    <div class="order-list-big fn-ohide fn-mb20">
                        <div class="search-box">
                            {!! Form::open(['url' => '/my/refund', 'name'=>'search', 'class'=>"bl-form",'method'=>'get']) !!}

                                <div class="fn-dib fn-rel keybox">
                                    <input type="text" name="order_sn" placeholder="订单编号" autocomplete="off" class="fn-tinput key">
                                    <span class="fn-dib submit">
                                        <button class="fn-btn btn-submit" type="submit">搜索</button>
                                    </span>
                                    <i class="icon icon-search fn-abs"></i>
                                </div>

                            {!!Form::close()   !!}
                        </div>
                        <div class="order-type">
                            <ul class="link-list link-list-skin2">
                                {{--<li class="cur"><a href="{{URL('my/refund')}}">申请退货</a></li>--}}
                                <li><a href="{{route('my.refund.record')}}">退货记录</a></li>
                                {{--<li><a href="{{route('my.refund.detail')}}">退款明细</a></li>--}}
                            </ul>
                        </div>
                    </div>


                    <table class="bl-table bl-table-tdLi table-tc ui-brd-box1 return-order-list">
                        <tr>
                            <th style="width: 120px;">订单编号</th>
                            <th class="tl">订单商品</th>
                            <th style="width: 120px;">客服</th>
                            <th style="width: 130px;">
                                下单时间
                                {{--<div class="bl-ddmenu ddmenu-select">
                                    <a class="menu-btn"><span class="text" style="width: 50px;">近三个月订单</span><i class="ficon-arr-b"><i class="icon f-icon icon-arrow-b1 "></i></i></a>
                                    <div class="menu-con" style="padding-top: 0px; margin-top: 31px; left: 0px;">
                                        <ul class="menu-list">
                                            <li data-value="0"><a href="#">下单时间</a></li>
                                            <li data-value="1"><a href="#">近三个月</a></li>
                                            <li data-value="2"><a href="#">今年内</a></li>
                                            <li data-value="3"><a href="#">2014年</a></li>
                                            <li data-value="4"><a href="#">2013年</a></li>
                                            <li data-value="5"><a href="#">2013年</a></li>
                                        </ul>
                                    </div>
                                    <input type="text" name="date" value="0" class="menu-input">
                                </div>--}}
                            </th>
                        </tr>
                        @foreach($orders as $orderInfo)
                            <tr>
                                <td>
                                    <a href="/my/order/{{$orderInfo->order_id}}" class="text-color-8">{{$orderInfo->order_sn}}</a>
                                </td>
                                <td class="tl">
                                    <ul class="goods-list">
                                        <?php $orderGoods=$orderService->getOrderGoods($orderInfo->order_id); ?>
                                        @foreach($orderGoods as $item)
                                            <li>
                                                <a class="pic" href="{{route('front.goods.detail', $item->goods_id)}}" target="_blank" title="{{$item->goods_name}}" >
                                                    <img class="head-img" src="{{$pictureService::thumb($item->goods_thumb, 70, 70)}}" alt="{{$item->goods_name}}">
                                                </a>
                                                {{--<a href="/my/refund/create?order_sn={{$orderInfo->order_sn}}&goods_id={{$orderInfo->goods_id}}" class="fn-btn btn-success">申请</a>--}}
                                                <a href="{{route('my.refund.apply',[$orderInfo->order_sn,$item->goods_id])}}" class="fn-btn btn-success">申请</a>
                                            </li>
                                        @endforeach
                                    </ul>

                                </td>
                                <td>
                                    <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=3039215126&amp;site=qq&amp;menu=yes"><i class="icon icon-qq-blue-sm" style="margin-top: -3px;"></i> 联系客服</a>
                                </td>
                                <td>
                                    <p class="text-color-7">{{$orderInfo->add_time}}</p>
                                </td>
                            </tr>

                        @endforeach

                    </table>
                    <div class="pager pager-m20 fn-tr">
                        <ul class="pagination">
                            {!! $orders->appends(['order_sn' => $search['order_sn']])->render() !!}
                        </ul>
                    </div>



                </div>

                <div class="bl-notes">
                    <div class="bl-note-content">
                        <h4>返修/退换货申请常见问题</h4>
                        <ul>
                            <li>
                                1.“申请”按钮若为灰色，可能是因为订单尚未完成或该商品正在返修/退换货中;
                            </li>
                            <li>
                                2.查看 <a href="/help/return-policy" class="text-color-8">售后政策</a>;
                            </li>
                        </ul>
                    </div>
                </div>


            </div>

        </div>
        <!--END/主体部分-->

    </div>
</div>

<!--公共尾部-->
@include('front.common.footer')
<!--END/公共尾部-->

<!--公用js引用-->
@include('front.common.script')
<!--END/公用js引用-->

</body>
</html>